<extend name="Index/index" />
<block name="main">
    <div class="row-fluid sortable">		
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<!-- <h2><i class="icon-user"></i> Members</h2> -->
						<div class="box-icon">
							<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
							<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
							<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
						</div>
					</div>
					<div id="search">
		      		<form action="<{:U('index')}>" method='post'>
		      			 电影名称: <input type="text" name="name" class='search'>
		      			 <input class="button" type="submit" >
		     		 </form>
		    	</div>
					<div class="box-content">
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th>电影编号</th>
								  <th>电影名称</th>
								  <th>分类编号</th>
								  <th>电影时长</th>
								  <th>影片导演</th>
								  <th>语言</th>
								  <th>国家</th>
								  <th>上映日期</th>
								  <th>状态</th>
								  <th>电影剧情</th>
								  <th>操作</th>
							  </tr>
						  </thead>   
						  <tbody>
							<!-- start volist -->
							<empty name="list">
							<tr>
								<td colspan=11><{$row}></td>
							</tr>
							<else />
						  	<volist name="list" id="vo">

								<tr>
									<td><{$vo.id}></td>
									<td class="center"><{$vo.name}></td>
									<td class="center"><{$vo.cid}></td>
									<td class="center"><{$vo.duration}></td>
									<td class="center"><{$vo.director}></td>
									<td class="center"><{$vo.language}></td>
									<td class="center"><{$vo.country}></td>
									<td class="center"><{$vo.showdate|date="Y-m-d",###}></td>
									<td class="center"><a href="#" class="btn btn-change label label-success icon-white bt" bz="<{$vo.id}>"><if condition="$vo.display eq '1'">隐藏<else />显示</if></a></td>
									<td class="center" ><div style="width:100px;height:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"><{$vo.drama}></div></td>
									<td class="center">
										
										<a class="btn btn-info" href="<{:U('Movie/edit',array('id'=>$vo['id']))}>">
											<i class="icon-edit icon-white"></i>  
											编辑                                            
										</a>
										<a class="btn btn-danger" href="<{:U('Movie/delete',array('id'=>$vo['id']))}>">
											<i class="icon-trash icon-white"></i> 
											删除
										</a>
										<a class="btn btn-danger" href="<{:U('Img/index',array('id'=>$vo['id']))}>" style="margin-top:5px;">
											<i class="icon-trash icon-white"></i> 
											图片管理
										</a>
										<a class="btn btn-danger" href="<{:U('ActorMovie/index',array('id'=>$vo['id']))}>" style="margin-top:5px;">
											<i class="icon-trash icon-white"></i> 
											主演管理
										</a>
									</td>
								</tr>
							
							</volist> <!-- end volist -->
							</empty>
						  </tbody>
						  <{$page}>
					  </table>            
					</div>
				</div><!--/span-->
			
			</div><!--/row-->
	<script>
		$(function()
		{
			
			$('.bt').click(function() 
			{
				/*if ($(this).html() == '隐藏') {
					var list = 0;
				} else {
					list = 1;
				}*/
				var id = $(this).attr ('bz');
				_this = $(this);
				console.log(id);
				$.ajax(
				{
					type:'get',
					url:"<{:U('Movie/update1')}>",
					data:{id:id},
					success:function(data) 
					{
						
						_this.html(data);
					},
				})

			})
		})
	</script>

			</block>
